<?
    require_once("config.php");
    require_once("objects/listing.php");
    require_once("objects/advanced_image_viewer.php");
    Functions::PrintHeader("Sandbox");
    ?>
    <!--
    <div>
        <div style='position:relative; float:left; border:solid 3px black; width:100%;'>
            <div style='margin-left:200px; border-left:solid 1px black; padding: 10px; position:relative; float:left;'>
                margin-left:200px;<br>
                border-left:solid 1px black;<br>
                padding:10px;<br>
                position:relative;<br>
                float:left;<br>
            </div>
        </div>
        <div style='position:relative; width:150px; float:left; margin-left:-100%; padding:10px;'>
            position:relative;<br>
            width:150px;<br>
            margin-left:-100%;<br>
            padding:10px<br>
        </div>
    </div>
    
    <div class='aimageviewer'>
        <div class='indicatorbar'>
            <table class='navbar'>
                <tr>
                    <td><input type='button' class='prev' value='Prev' /></td>
                    <td width='100%'>
                        <a class='indicator'>&nbsp;&nbsp;&nbsp;</a>
                        <a class='indicator'>&nbsp;&nbsp;&nbsp;</a>
                        <a class='indicator'>&nbsp;&nbsp;&nbsp;</a>
                        <a class='active indicator'>&nbsp;&nbsp;&nbsp;</a>
                        <a class='indicator'>&nbsp;&nbsp;&nbsp;</a>
                    </td>
                    <td><input type='button' class='next' value='Next' /></td>
                </tr>
            </table>
        </div>
        
        <div class='image'>
            <img src='http://localhost/rpihousing/listingimages/cache/5ee1b85e9c20981d01fce77836230ffe_175x132.png' />
        </div>
        
        <div class='comment'>
            Andrew doing something
        </div>
    </div>
    -->
    <?
    
    $row = new ListingRow(1);
    echo $row;
    echo "<br>";
    
    $images = ListingImageManager::GetImages(1);
    $comments = array_values(ListingImageManager::GetImages(1,true));
    $viewer = new AdvancedImageViewer($images,0);
    $viewer->AddComments($comments);
    echo $viewer;
    ?>
    
    <script type='text/javascript'>
        aiv_initialize();
    </script>
    
    <?
    
    
    // Play around with renderSearchable();
    
    // 2 - select
    // 10 - checkbox
    // 23 - radio
    // 26 - textfield
    // 27 - textarea
    
    require_once("objects/form_elements.php");
    require_once("objects/editable_form_elements.php");
    
    $controls = array();
    $controls[] = new EditableSelect(2,2);
    $controls[] = new EditableCheckboxes(10,2);
    $controls[] = new EditableRadio(23,2);
    $controls[] = new EditableTextfield(26,2);
    $controls[] = new EditableTextarea(27,2);
    
    foreach ($controls as $control) {
        echo $control . "<br>";
    }
    
    Functions::PrintFooter();
?>